package com.ruoyi.business.config;

import Ice.Communicator;
import Ice.InitializationData;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class CommunicatorBeanConfig {

    @Bean
    public Communicator createCommunicator() {
        InitializationData initData = new InitializationData();
        initData.properties = Ice.Util.createProperties();
        initData.properties.setProperty("Ice.MessageSizeMax", "2097152"); // 设置最大消息大小为2MB
        return Ice.Util.initialize(initData);
    }

}
